<template>
  <div class="parent-settings">
    <h2>家长设置</h2>
    <div class="setting-block">
      <div class="setting-title">单日支出预警</div>
      <div class="setting-desc">设置金额阈值，超额提醒</div>
      <input type="number" placeholder="如50元" class="threshold-input" />
      <button class="set-btn">保存阈值</button>
    </div>
    <div class="setting-block">
      <div class="setting-title">周消费趋势</div>
      <div class="setting-desc">仅家长端可见</div>
      <div class="trend-placeholder">📈 折线图占位</div>
    </div>
    <div class="setting-block">
      <div class="setting-title">账户重置</div>
      <div class="setting-desc">一键清空所有记录（需验证家长密码）</div>
      <input type="password" placeholder="家长密码" class="pwd-input" />
      <button class="reset-btn">重置账户</button>
    </div>
    <router-link to="/" class="back-btn">返回首页</router-link>
  </div>
</template>

<script setup lang="ts">
// 这里可后续引入管控逻辑
</script>

<style scoped>
.parent-settings {
  background: #F9F9F9;
  min-height: 100vh;
  padding: 32px 0 40px 0;
  text-align: center;
}
.setting-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px #eee;
  margin: 24px auto;
  padding: 20px 0 16px 0;
  width: 80vw;
  max-width: 340px;
}
.setting-title {
  font-size: 18px;
  color: #6CC417;
  margin-bottom: 4px;
}
.setting-desc {
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
}
.threshold-input, .pwd-input {
  width: 60%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 8px;
  font-size: 16px;
}
.set-btn, .reset-btn {
  background: #FF6B6B;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 24px;
  font-size: 16px;
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.set-btn:active, .reset-btn:active {
  background: #d94a4a;
}
.trend-placeholder {
  font-size: 24px;
  color: #bbb;
  margin: 16px 0 0 0;
}
.back-btn {
  display: inline-block;
  margin-top: 32px;
  background: #6CC417;
  color: #fff;
  border-radius: 24px;
  padding: 12px 32px;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 2px 8px #cdebb0;
  transition: background 0.2s;
}
.back-btn:active {
  background: #4e9e13;
}
</style>